A technique for detecting a human face from a subject image captured with a digital camera, or the like, by means of photographing has hitherto been known. For instance, Japanese Publication No. 2008-98755 discloses a technique for detecting a face image from a subject image, superimposing a circular, square, or oval icon on the image in correspondence to the face image, and displaying the thus-superimposed image. Detecting eyes from an image at the time of detection of a face and extracting characteristic points serving as organs (parts) of a face other than the eyes are described.
When a human face is detected from a subject image, a negative correlation generally exists between the size of a face to be detected and a processing time consumed by detection. Namely, the smaller the size of a face to be detected, the longer a processing time required for detection. Further, the larger the size of a face to be detected, the shorter the processing time required for detection.
In the meantime, as a distance to a person becomes shorter, the size of a face of the person in a subject image becomes greater. When compared with a case where a distance to a face is long and where the size of the face is small, priority of detection of the face becomes higher.
For these reasons, in the case of detection of a human face, conceivable processing is to first detect a large-size face involving consumption of a longer processing time and a comparatively great necessity for detection; next detect a medium-size face and finally detect a small-size image; and output results of detection as a detection result.
However, provided that a large-size face has emerged in a subject image after a transition is made to processing for detecting a face of a medium size, or thereabouts, as a result of an attempt being first made to detect a large-size face but ending in a failure (as in a case where a digital camera pans or zooms in, and the like), the face cannot be detected by means of processing for detecting a face of a medium size, or thereabouts. Even when a transition is next made to processing for detecting a small-size face, the large-size face cannot yet been detected. Detection of the face becomes successful as a result of a transition being made to the next detection cycle and again to processing for detecting a large-size face. A detection result is first output after a transition has been made to subsequent processing for detecting a face of a medium size or thereabouts and processing for detecting a small-size face. Consequently, a lag arises between a timing at which a large-size face is detected and a timing for outputting a detection result.
A result of detection of a face can be used for controlling AE (automatic exposure control), AF (automatic focusing control), AWB (automatic white balance), and the like, as well as for displaying an icon superimposed on a subject image as in the related art. Hence, a lag in a timing for detecting a face causes a lag in control operations, such as AE, AF, and AWB. It is also effective to increase processing speed of a CPU in a face detection circuit or a face detection engine, thereby shortening a detection cycle. However, this method leads to an increase in a processing load or cost of the CPU.